package com.itheima.app.interceptor;

import com.itheima.domain.db.User;
import org.bouncycastle.pqc.jcajce.provider.qtesla.SignatureSpi;
import org.springframework.stereotype.Component;

public class UserHolder {

    private static final ThreadLocal<User> TLUser = new ThreadLocal<>();

    public static void set(User user){

        TLUser.set(user);
    }

    public static User get(){

        return TLUser.get();
    }

    public static void remove(){

        TLUser.remove();
    }
}
